#ifndef _PROCESS_H_
#define _PROCESS_H_

#include "types.h"

#define DEFAULT_USER_STACK_SIZE		0x40000		// 256K

#define PROCESS_LOWEST_PRIORITY 15
#define PROCESS_OPERATOR_PRIORITY 13
#define PROCESS_USER_PRIORITY 10
#define PROCESS_DRIVER_PRIORITY 5
#define PROCESS_HIGHEST_PRIORITY 0
#define NUM_PROCESS_PRIORITIES 16


/*
* Used by user program to 
* specify the info of the program
* to be loaded 
*/
typedef struct
{
	void (*addr)(void);
	const uint8_t *name;
	uint32_t stack_size;
	uint8_t  process_priority;
}process_info_t;


void exit(uint32_t exit_code);
void exec_mem( void (*addr)(void), const uint8_t *name, uint32_t stack_size, uint8_t process_priority);


#endif
